package day04;
import  java.util.Scanner;
public class CommandBySwitch {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择功能：1.存款 2.取款 3.转账 4.退出");
        int command = scan.nextInt();

        switch (command){
            case 1:
                System.out.println("存款业务……");
                break;
            case 2:
                System.out.println("取款业务……");
                break;
            case 3:
                System.out.println("转账业务……");
                break;
            case 4:
                System.out.println("退出成功");
                break;
            default:
                System.out.println("输入错误");
        }

        if(command == 1){
            System.out.println("存款业务……");
        }else if(command == 2){
            System.out.println("取款业务……");
        }else if(command == 3){
            System.out.println("转账业务……");
        }else if(command == 4){
            System.out.println("退出成功");
        }else{
            System.out.println("输入错误");
        }
        /*
        int command = scan.nextInt();
        System.out.println("为"+command);

        三要素
        循环变量的初始化
        循环的条件(以循环变量为基础 )
        循环变量的改变

        循环变量：所跑圈数count



         */
        /*
        int count = 0;
        count < 3;
        count++;
        count=0/1/2/3时结束

         */
        /*
        int num = 4;
        switch (num){ //byte,short,int,char,String,枚举
            case 1://if(num==1);
                System.out.println(111);
                break;
            case 2:
                System.out.println(222);
                break;
            case 3:
                System.out.println(333);
                break;
            default:
                System.out.println(666);

        }

         */
    }
}
